if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].sp_HangHoa_GetByID') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].sp_HangHoa_GetByID
GO

CREATE PROCEDURE sp_HangHoa_GetByID
		@ID					int
AS
	SELECT	ID,
			Ma_hang,
			Ten,
			Ma_nhom_hang,
			Thue,
			Chiet_khau,
			Ghi_chu,
			Ma_don_vi_qui_doi,
			Gia_nhap,
			Gia_ban_si,
			Gia_ban_le,
			Ton_dinh_muc,
			Mo_ta,
			Hinh,
			Barcode_old,
			Barcode_new,
			Barcode_date,
			Tien_thuong,
			Ngay_cap_nhat_cuoi
	FROM HangHoa
	WHERE ID = @ID